package com.yonyou.struts2demo.collection;

import com.opensymphony.xwork2.ActionSupport;
import com.yonyou.struts2demo.form.User;

import java.util.List;

/**
 * @Author wwj
 * @Date 2021/12/13
 * @Description 封装数据到 list 集合
 */
public class DataToListAction extends ActionSupport {

    // 1 声明 list 变量
    private List<User> list;

    // 2 生成 get  set 方法
    public List<User> getList() {
        return list;
    }

    public void setList(List<User> list) {
        this.list = list;
    }

    @Override
    public String execute() throws Exception {

        System.out.println("list = " + list);
        return NONE;
    }
}
